<?php
include("../spaw.inc.php");
	function holas()
	{
		$num=1;
		if(isset($_GET['num'])){
			$num=$_GET['num'];
		}
		$sw = new SpawEditor('text');
		for($i=1; $i <=$num; $i++)
		{
			$list .= "<h3>DEMO # ".$i."</h3>";
			// pass $demo_array to the constructor
			echo $name_editor='spaw'.$i;
			$sw->addPage(new SpawEditorPage($name_editor,$i,'',$article));
		}
		$list .= $sw->show();
		$list .= '<br><a href="?num='.($num+1).'">una mas</a>';
		return $list;
	}
	
	function holas2()
	{
		$num=1;
		if(isset($_GET['num'])){
			$num=$_GET['num'];
		}
		$sw = new SpawEditor('text');
		for($i=1; $i <=$num; $i++)
		{
			$list .= "<h3>DEMO # ".$i."</h3>";
			// pass $demo_array to the constructor
			echo $name_editor='spaw'.$i;
			$sw = new SPAW_Wysiwyg('spaw1',stripslashes($HTTP_POST_VARS['spaw1']));
			$list .= $sw->show();
		}
		$list .= '<br><a href="?num='.($num+1).'">una mas</a>';
		return $list;
	}
	
	function holas3()
	{
		$num=1;
		$list='<form>';
		if(isset($_GET['num'])){
			$num=$_GET['num'];
		}
		//$sw = new SpawEditor('text');
		for($i=1; $i <=$num; $i++)
		{
			$list .= "<h3>DEMO # ".$i."</h3>";
			// pass $demo_array to the constructor
			echo $name_editor='spaw'.$i;
			$sw = new SPAW_Wysiwyg($name_editor,stripslashes($HTTP_POST_VARS[$name_editor]));
			$list .= $sw->show();
		}
		$list .= '</form><br><a href="?num='.($num+1).'">una mas</a>';
		return $list;
	}
	echo holas3();
  ?>